home *** CD-ROM | disk | FTP | other *** search
- %if MenuItemName = Cut%
- {----------}
- Procedure DoCut;
- Begin
- if cur^.text <> nil then begin
- TECut (cur^.text);
- cur^.dirty := true;
- scrapDirty := true;
- end;
- End; {DoCut}
-
- %elsif MenuItemName = Copy%
- {----------}
- Procedure DoCopy;
- Begin
- if cur^.text <> nil then begin
- TECopy (cur^.text);
- scrapDirty := true;
- end;
- End; {DoCopy}
-
- %elsif MenuItemName = Paste%
- {----------}
- Procedure DoPaste;
- Begin
- if cur^.text <> nil then begin
- TEPaste (cur^.text);
- cur^.dirty := true;
- end;
- End; {DoPaste}
-
- %elsif MenuItemName = Clear%
- {----------}
- Procedure DoClear;
- Begin
- if cur^.text <> nil then begin
- TEDelete (cur^.text);
- cur^.dirty := true;
- end;
- End; {DoClear}
-
- %elsif MenuItemName = SelectAll%
- {----------}
- Procedure DoSelectAll;
- Begin
- if cur^.text <> nil then begin
- TESetSelect (0, maxint, cur^.text);
- end;
- End; {DoSelectAll}
-
- %elsif menuitemname = CreatePublisher%
- {----------}
- Procedure DoCreatePublisher;
- var
- theErr: OSErr;
- pdReply: NewPublisherReply;
- Begin
- {$ifc false}
- Uses Packages;
- pdReply.usePart := false;
- pdReply.preview := nil; {should be handle to and}
- pdReply.previewFormat := 'TEXT'; {type of preview data}
-
- { fill in pdReply.container: }
- HLock (Handle (cur^.filename));
- theErr := FSMakeFSSpec(cur^.volNum, 0 {dirID}, cur^.filename^,
- pdReply.container.theFile);
- {should really pass default edition name}
- {instead of cur^.filename}
- HUnlock (Handle (cur^.filename));
- if theErr = noErr then begin { FSMakeFSSpec went ok }
- pdReply.container.theFileScript := iuCurrentScript;
- { should be script code for cur^.filename }
- pdReply.container.thePart := kPartsNotUsed;
- pdReply.container.thePartName := ''; { not used }
- pdReply.container.thePartScript := 0; { not used }
-
- theErr := NewPublisherDialog (pdReply);
- if (theErr = noErr) and notpdReply.canceled then begin
- { handle new publisher }
- end { otherwise, NewPublisherDialog error or user cancelled }
- end else begin
- { handle FSMakeFSSpec error }
- end
- {$endc}
- End; {DoCreatePublisher}
-
- %elsif menuitemname = SubscribeTo%
- {----------}
- Procedure DoSubscribeTo;
- var
- theErr: OSErr;
- sdReply: NewSubscriberReply;
- Begin
- sdReply.formatsMask := kTEXTformatMask;
- theErr := GetLastEditionContainerUsed (sdReply.container);
- theErr := NewSubscriberDialog (sdReply);
- if not sdReply.canceled then begin
- { handle subscriber to }
- end;
- End; {DoSubscribeTo}
-
- %elsif menuitemname = SubscriberOptions%
- {----------}
- { This procedure displays either the publisher options or }
- { subscriber options dialog, depending on what's selected. }
- {----------}
- Procedure DoSubscriberOptions;
- var
- theErr: OSErr;
- soReply: SectionOptionsReply;
- Begin
- theErr := SectionOptionsDialog (soReply);
- if (theErr = noErr) & (not soReply.canceled) then begin
- if soReply.action = 'read' then begin { "Get Edition Now" }
-
- end else if soReply.action = 'writ' then begin
- { "Send Edition Now" }
-
- end else if soReply.action = 'goto' then begin
- { "Open Publisher" }
-
- end else if soReply.action = 'cncl' then begin
- { "Cancel Publisher/Subscriber" }
-
- end else if soReply.action = ' ' then begin
- { "OK" }
-
- end;
- end;
- End; {DoSubscriberOptions}
-
- %else%
- %DoMenuItem%
- %end if%
-